package com.liy.cloud.common.base.entity;

import com.das.framework.common.vo.BaseVO;
import org.apache.ibatis.annotations.Insert;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Size;
import java.util.List;

/**
* @Author:  liyang
* @Date:    2018/5/7  14:22
* @Description:
*
**/
public class BaseGoodsPropertyEntity extends BaseVO<String>{

	private static final long serialVersionUID = 1L;

	@NotBlank(message="{common.validation.notnull}", groups= {Insert.class})
	@Size(max=20, message="{common.validation.length}")
	private String id;

	/**
	@NotEmpty 验证字符串不为null或者不为空
	@NotBlank 验证字符串不为null或者trim()后不为空
	*/
	@NotBlank(message="{common.validation.notnull}", groups= {Insert.class})
	@Size(max=50, message="{common.validation.length}")
	private String name;

    /*
     *  物品大类
     **/
    @Size(max=2, message="{common.validation.length}")
	private String type;

	@NotBlank(message="{common.validation.notnull}", groups= {Insert.class})
	private Double itemamount;
	
    @Size(max=2, message="{common.validation.length}")
	private String validF;

    @Size(max=20, message="{common.validation.length}")
	private String validTime;

    /*
    *  物品小类
    **/
	@Size(max=2, message="{common.validation.length}")
	private String typeEx;

    /*
     *  物品小类 集合
     **/
	private List<String> typeExs;

    @Size(max=2, message="{common.validation.length}")
	private String cardtypeId;
    private String cardtypeIdName;

    public BaseGoodsPropertyEntity(){super();}

    /**
    * @Author:  liyang
    * @Date:    2018/8/29  9:35
    * @Description:  type大类  小类typeExs集合 构造
    *
    **/
    public BaseGoodsPropertyEntity(String type,List<String> typeExs){
        this.type = type;
        this.typeExs = typeExs;
    }

    /**
     * @Author:  liyang
     * @Date:    2018/8/29  9:35
     * @Description:  type大类  小类typeEx 构造
     *
     **/
    public BaseGoodsPropertyEntity(String type,String typeEx){
        this.type = type;
        this.typeEx = typeEx;
    }

    /**
    *   Geter and Seter
    **/
	@Override
	public String getId() {
		return id;
	}

	@Override
	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Double getItemamount() {
		return itemamount;
	}

	public void setItemamount(Double itemamount) {
		this.itemamount = itemamount;
	}

	public String getValidF() {
		return validF;
	}

	public void setValidF(String validF) {
		this.validF = validF;
	}

	public String getValidTime() {
		return validTime;
	}

	public void setValidTime(String validTime) {
		this.validTime = validTime;
	}

	public String getTypeEx() {
		return typeEx;
	}

	public void setTypeEx(String typeEx) {
		this.typeEx = typeEx;
	}

	public String getCardtypeId() {
		return cardtypeId;
	}

	public void setCardtypeId(String cardtypeId) {
		this.cardtypeId = cardtypeId;
	}

	public String getCardtypeIdName() {
		return cardtypeIdName;
	}

	public void setCardtypeIdName(String cardtypeIdName) {
		this.cardtypeIdName = cardtypeIdName;
	}
}
